﻿@using HCMS.Enum
@using HCMS.Extensions
@model HCMS.Entities.Base.FrontEndErrorLogs
@{
    Layout = "~/Views/Shared/_Layout_Edit_Pear_Layui.cshtml";
}

<div class="layui-body layui-bg-gray">
    <div class="layui-card">
        <div class="layui-tab layui-tab-card">
            <ul class="layui-tab-title">
                <li class="layui-this">异常数据信息</li>
                <li>客户端信息</li>
            </ul>

            <div class="layui-tab-content">
                <!-- 异常数据信息 -->
                <div class="layui-tab-item layui-show">
                    <div class="layui-form-item">
                        <div class="layui-form-label">页面链接</div>
                        <div class="layui-form-label content-label">
                            @Model.Url
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <div class="layui-form-label">异常信息</div>
                        <div class="layui-form-label content-label layui-font-red">
                            @Model.ErrorMessage
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <div class="layui-form-label">
                            异常<br />
                            文件路径
                        </div>
                        <div class="layui-form-label content-label">
                            @Model.ScriptUrl
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <div class="layui-form-label">异常 行号</div>
                        <div class="layui-form-label content-label">
                            @Model.LineNo
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <div class="layui-form-label">异常 列号</div>
                        <div class="layui-form-label content-label">
                            @Model.ColumnNo
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <div class="layui-form-label">异常堆栈</div>
                        <div class="layui-form-label content-label">
                            @Model.Stack
                        </div>
                    </div>
                </div>

                <!-- 客户端信息 -->
                <div class="layui-tab-item">
                    <div class="layui-form-item">
                        <div class="layui-form-label">所属应用</div>
                        <div class="layui-form-label content-label">
                            @switch (Model.AppId)
                            {
                                case (int)FrontEndMonitoringAppType.Manage:
                                    <text>管理系统</text>
                                    break;
                            }
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <div class="layui-form-label">客户端系统</div>
                        <div class="layui-form-label content-label">
                            @Model.ClientSystem
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <div class="layui-form-label">客户端时间</div>
                        <div class="layui-form-label content-label">
                            @Model.ClientTime
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <div class="layui-form-label">网络类型</div>
                        <div class="layui-form-label content-label">
                            @Model.NetworkType
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <div class="layui-form-label">
                            用户代理<br />
                            请求头
                        </div>
                        <div class="layui-form-label content-label">
                            @Model.UserAgent
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <div class="layui-form-label">Cookie 信息</div>
                        <div class="layui-form-label content-label">
                            @{
                                var cookieArray = Model.Cookie.ToString("").Split(";", StringSplitOptions.RemoveEmptyEntries);
                                var cookieInfo = string.Join("<br />", cookieArray);

                                @cookieInfo
                            }
                        </div>
                    </div>
                </div>
            </div>
        </div>

        <div class="layui-form-item layui-fixbar btn-fixbar-box">
            <div class="layui-input-block">
                <button type="button" class="layui-btn layui-btn-primary layui-border-red" lay-on="close">
                    <i class="layui-icon layui-icon-close"></i>关闭
                </button>
            </div>
        </div>
    </div>
</div>